package com.hotel.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.math.BigDecimal;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author Lin
 * @since 2022-06-20
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName("refund")
public class Refund {

    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    /**
     * 订单号
     */
    @TableField("order_no")
    private String orderNo;

    /**
     * 退款单号
     */
    @TableField("refund_no")
    private String refundNo;

    /**
     * 原订单金额
     */
    @TableField("total_fee")
    private BigDecimal totalFee;

    /**
     * 要退款的金额
     */
    @TableField("refund_fee")
    private BigDecimal refundFee;

    /**
     * 退款原因
     */
    @TableField("reason")
    private String reason;

    /**
     * 创建时间
     */
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", locale = "zh",timezone ="GMT+8")
    private Date createTime;

    /**
     * 昵称
     */
    @TableField(exist = false)
    private String nickName;

    /**
     * 状态
     */
    @TableField(exist = false)
    private Integer status;


}
